package com.example.zuoye1023.utils

import com.example.rikao1023.bean.BeanBanner
import com.example.rikao1023.bean.BeanGoods
import com.example.rikao1023.bean.BeanLogin
import com.example.rikao1023.bean.DataGoods
import com.example.rikao1023.bean.Databanner
import com.example.rikao1023.bean.Datalogin
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ApiSeriver {
    @POST("user/loginjson")
    suspend fun login(@Body map:HashMap<String,String>):BeanLogin<Datalogin>

    @POST("user/register")
    suspend fun reg(@Body map:HashMap<String,String>):BeanLogin<Datalogin>

    @GET("banner/json")
    suspend fun baner():BeanBanner<List<Databanner>>

    @GET("goods/info")
    suspend fun goods(@Query("category_id") category_id:Int,@Query("currentPage") currentPage:Int,@Query("pageSize") pageSize:Int):BeanGoods<List<DataGoods>>

}